<template>
  <div class="sameReportCheck">

    <el-dialog title="请仔细判断是否一号多人" :visible.sync="dialogFormVisible" :center="isCenter" width="1200px">
      <el-table :data="dataList" width="1200px">
        <el-table-column width="240" label="送检项目" show-overflow-tooltip>
          <template slot-scope="scope">
            <el-tag type="success" v-if="scope.row.isCurrent">当前</el-tag>
            <span>{{scope.row.itemName}}</span>
          </template>
        </el-table-column>
        <el-table-column prop="reportBeginTime" width="90" label="送检时间"></el-table-column>
        <el-table-column width="120" label="编号" prop="reportCode"></el-table-column>
        <el-table-column width="120" label="平台条码号" prop="myReportCode"></el-table-column>
        <el-table-column prop="insReportCode" label="医检条码号" width="120"></el-table-column>
        <el-table-column width="120" align="center" label="姓名-性别-年龄">
          <template slot-scope="scope">
            <span>{{scope.row.patientName}} - {{formatSex(scope.row.patientSex)}} - {{scope.row.patientAge}}</span>
          </template>
        </el-table-column>
        <el-table-column width="200" align="center" label="医院-科室-医生">
          <template slot-scope="scope">
            <span>{{scope.row.hospitalName}} - {{scope.row.officeName}} - {{scope.row.doctorName}}</span>
          </template>
        </el-table-column>
        <el-table-column prop="institutionName" label="医检机构" width="200"></el-table-column>
      </el-table>
      <div class="variant_btn">
        <el-button type="primary" size="mini" @click="handleSuccess">一号多人</el-button>
        <el-button type="" size="mini" @click="handleCancel">取消</el-button>
      </div>
    </el-dialog>
  </div>
</template>
<script>
  export default {
    name: 'sameReportCheck',
    props: {
      dataList: {
        type: Array,
        default: () => []
      }
    },
    watch: {
      /*productOnline(val) {
        this.productOnlinetype = val
      },*/
    },
    created() {

    },
    data() {
      return {
        //recordList: [],
        dialogFormVisible: false,
        isCenter: true,
      }
    },
    methods: {
      formatSex (cellValue) {
        if (cellValue === 1) {
          return '男'
        } else if (cellValue === 2) {
          return '女'
        }
      },
      handleSuccess(){
        this.$emit('addReportSure')
      },
      handleCancel(){
        this.dialogFormVisible = false
      },
      handleCreate() {
        this.dialogFormVisible = true
      }
    }
  }
</script>
<style lang="scss">
  .variant-input {
    margin-top: 2px
  }

  .appointRecords .country_ul {
    position: relative;
  }

  .country_ul .country_tabs {
    float: left;
    margin-bottom: 0;
    padding-left: 0;
    list-style: none;
    margin-bottom: -4px;
  }

  .country_ul .country_tabs li {
    float: left;
    cursor: pointer;
    background-color: #eee;
    width: 60px;
    height: 35px;
    margin-right: 5px;
    border: 1px solid #ddd;
    border-radius: 6px;
  }

  .country_ul .country_tabs .active {
    background-color: #fff;
  }

  .country_ul .country_tabs li a {
    span {
      line-height: 30px;
      margin-left: 15px;
    }
  }

  .variant_btn {
    display: flex;
    justify-content: center;
    margin-top: 10px;
  }
</style>
